import { createApp } from "vue";
import App from "./App.vue";
import router from "./router/index";
import ElementPlus from "element-plus";
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
import { toLine } from "./utils/index";
import "element-plus/dist/index.css";
import * as Icons from "@element-plus/icons-vue";
// import mUI from "./components"; //注册全局组件
import mUI from "vue-ele-plus";
import "vue-ele-plus/style.css";
// 全局引入--使用打包后的lib
// import mUI from "../lib/index.es.js";
// import "../lib/style.css";
// 单独引入--使用打包后的lib
// import chooseIcon from "../lib/chooseicon/index.es.js";
// import "../lib/chooseicon/style.css";

const app = createApp(App);
// 注册组件
for (let i in Icons) {
  app.component(`el-icon-${toLine(i)}`, (Icons as any)[i]);
}
app.use(ElementPlus, { locale: zhCn });
app.use(router);
app.use(mUI);
// app.use(chooseIcon);
app.mount("#app");
